Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--com.sun.java.swing.JComponent | +--com.sun.java.swing.text.JTextComponent | +--com.sun.java.swing.JEditorPane
The content type that editor is bound to at any given time is determined by the EditorKit currently installed. If the content is set to a new URL, its type is used to determine the EditorKit that should be used to load the content.
For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JEditorPane key assignments.
Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.
Inner Class Summary | |
JEditorPane.AccessibleJEditorPane
The class used to obtain the accessible role for this object. |
Inner classes inherited from class com.sun.java.swing.text.JTextComponent | |
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding |
Inner classes inherited from class com.sun.java.swing.JComponent | |
JComponent.AccessibleJComponent |
Fields inherited from class com.sun.java.swing.text.JTextComponent | |
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
Fields inherited from class com.sun.java.swing.JComponent | |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Constructor Summary | |
JEditorPane()
Constructs a new JEditorPane. |
|
JEditorPane(java.net.URL initialPage)
Creates a JEditorPane based on a specified URL for input. |
|
JEditorPane(java.lang.String url)
Creates a JEditorPane based on a string containing a URL specification. |
Method Summary | |
void | addHyperlinkListener(HyperlinkListener listener)
Adds a hyperlink listener for notification of any changes, for example when a link is selected and entered. |
EditorKit | createDefaultEditorKit()
Creates the default editor kit (PlainEditorKit) for when the component is first created. |
static EditorKit | createEditorKitForContentType(java.lang.String type)
Create a handler for the given type from the default registry of editor kits. |
void | fireHyperlinkUpdate(HyperlinkEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
AccessibleContext | getAccessibleContext()
Get the AccessibleContext associated with this JEditorPane. |
java.lang.String | getContentType()
Gets the type of content that this editor handles. |
EditorKit | getEditorKitForContentType(java.lang.String type)
Fetches the editor kit to use for the given type of content. |
EditorKit | getEditorKit()
Fetches the currently installed kit for handling content. createDefaultEditorKit() is called to set up a default if necessary. |
java.net.URL | getPage()
Gets the current url being displayed. |
boolean | getScrollableTracksViewportWidth()
Returns true if a viewport should always force the width of this Scrollable to match the width of the viewport. |
java.lang.String | getUIClassID()
Gets the class ID for the UI. |
boolean | isManagingFocus()
Turns off tab traversal once focus gained. |
static void | registerEditorKitForContentType(java.lang.String type,
java.lang.String classname)
Establishes the default bindings of type to name. |
void | removeHyperlinkListener(HyperlinkListener listener)
Removes a hyperlink listener. |
void | setContentType(java.lang.String type)
Sets the type of content that this editor handles. |
void | setEditorKitForContentType(java.lang.String type,
EditorKit k)
Directly set the editor kit to use for the given type. |
void | setEditorKit(EditorKit kit)
Sets the currently installed kit for handling content. |
void | setPage(java.net.URL page)
Sets the current url being displayed. |
void | setPage(java.lang.String url)
Sets the current url being displayed. |
Methods inherited from class java.awt.Container | |
add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paint, paramString, preferredSize, printComponents, print, processContainerEvent, processEvent, removeAll, remove, remove, removeContainerListener, removeNotify, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component | |
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Constructor Detail |
public JEditorPane()
public JEditorPane(java.net.URL initialPage) throws java.io.IOException
initialPage
- the URLpublic JEditorPane(java.lang.String url) throws java.io.IOException
url
- the URLMethod Detail |
public void addHyperlinkListener(HyperlinkListener listener)
listener
- the listenerpublic void removeHyperlinkListener(HyperlinkListener listener)
listener
- the listenerpublic void fireHyperlinkUpdate(HyperlinkEvent e)
e
- the eventpublic void setPage(java.net.URL page) throws java.io.IOException
page
- the URL of the pagepublic java.net.URL getPage()
public void setPage(java.lang.String url) throws java.io.IOException
url
- the URL for displaypublic java.lang.String getUIClassID()
protected EditorKit createDefaultEditorKit()
public final EditorKit getEditorKit()
public final java.lang.String getContentType()
public final void setContentType(java.lang.String type)
getEditorKitForContentType
,
and then setEditorKit
if an editor kit can
be successfully located. This is a convenience method
that can be used as an alternative to calling
setEditorKit
directly.
type
- the non-null mime type for the content editing
support.public void setEditorKit(EditorKit kit)
kit
- the desired editor behavior.public EditorKit getEditorKitForContentType(java.lang.String type)
This method can be reimplemented to use some other kind of type registry. This can be reimplemented to use the Java Activation Framework for example.
type
- the non-null content typepublic void setEditorKitForContentType(java.lang.String type, EditorKit k)
type
- the non-null content type
k
- the editor kit to be setpublic static EditorKit createEditorKitForContentType(java.lang.String type)
type
- the content typepublic static void registerEditorKitForContentType(java.lang.String type, java.lang.String classname)
type
- the non-null content type
classname
- the class to load laterpublic boolean isManagingFocus()
public boolean getScrollableTracksViewportWidth()
public AccessibleContext getAccessibleContext()
Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |